from myblog import db
import datetime


class Admin(db.Model):
    __tablename__ = 'b_admin'
    id = db.Column(db.Integer, primary_key=True)
    username = db.Column(db.String(20), unique=True)
    password = db.Column(db.String(16))
    iconSrc = db.Column(db.String(
        10000), default="https://img0.baidu.com/it/u=2774344826,392617489&fm=26&fmt=auto&gp=0.jpg")
    # 创建时间

    def __init__(self, username, password):
        self.username = username
        self.password = password

    def __repr__(self):
        return '<User %r>' % self.username
